import config from "@/config"
import http from "@/utils/request"

export default {
    // 供应商
    applyList: {
		getList: {
			url: `${config.API_URL}/adminapi/apply.Apply/lists`,
			name: "获取供应商",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
		add: {
			url: `${config.API_URL}/adminapi/apply.Apply/add`,
			name: "添加供应商",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		edit: {
			url: `${config.API_URL}/adminapi/apply.Apply/edit`,
			name: "编辑供应商",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/apply.Apply/delete`,
			name: "删除供应商",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        detail: {
			url: `${config.API_URL}/adminapi/apply.Apply/detail`,
			name: "供应商详情",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        update_status: {
			url: `${config.API_URL}/adminapi/apply.Apply/updateStatus`,
			name: "修改供应商状态",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
	},
    // 供应商类别
    applyCate: {
		list: {
			url: `${config.API_URL}/adminapi/apply.ApplyCategory/lists`,
			name: "获取供应商",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
		add: {
			url: `${config.API_URL}/adminapi/apply.ApplyCategory/add`,
			name: "添加供应商",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		edit: {
			url: `${config.API_URL}/adminapi/apply.ApplyCategory/edit`,
			name: "编辑供应商",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/apply.ApplyCategory/delete`,
			name: "删除供应商",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
	},
    // 仓库
    ware: {
		list: {
			url: `${config.API_URL}/adminapi/basics.Ware/lists`,
			name: "获取仓库",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
        all: {
			url: `${config.API_URL}/adminapi/basics.Ware/all`,
			name: "获取仓库",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
		add: {
			url: `${config.API_URL}/adminapi/basics.Ware/add`,
			name: "添加仓库",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		edit: {
			url: `${config.API_URL}/adminapi/basics.Ware/edit`,
			name: "编辑仓库",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/basics.Ware/delete`,
			name: "删除仓库",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        detail: {
			url: `${config.API_URL}/adminapi/basics.Ware/detail`,
			name: "仓库详情",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
	},
    // 资产类别
    assetList: {
		getList: {
			url: `${config.API_URL}/adminapi/asset.Class/lists`,
			name: "获取资产类别",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
		add: {
			url: `${config.API_URL}/adminapi/asset.Class/add`,
			name: "添加资产类别",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		edit: {
			url: `${config.API_URL}/adminapi/asset.Class/edit`,
			name: "编辑资产类别",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/asset.Class/delete`,
			name: "删除资产类别",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        detail: {
			url: `${config.API_URL}/adminapi/asset.Class/detail`,
			name: "资产类别详情",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        update_status: {
			url: `${config.API_URL}/adminapi/asset.Class/updateStatus`,
			name: "修改资产类别状态",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
	},
    // 组织
    orgList: {
		getList: {
			url: `${config.API_URL}/adminapi/dept.Org/lists`,
			name: "获取组织",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
		add: {
			url: `${config.API_URL}/adminapi/dept.Org/add`,
			name: "添加组织",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		edit: {
			url: `${config.API_URL}/adminapi/dept.Org/edit`,
			name: "编辑组织",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/dept.Org/delete`,
			name: "删除组织",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        detail: {
			url: `${config.API_URL}/adminapi/dept.Org/detail`,
			name: "组织详情",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        update_status: {
			url: `${config.API_URL}/adminapi/dept.Org/updateStatus`,
			name: "修改组织状态",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
	},
    // 部门
    dept: {
		lists: {
			url: `${config.API_URL}/adminapi/dept.dept/lists`,
			name: "获取部门列表",
			get: async function(params){
				return await http.get(this.url, params);
			}
		},
		add: {
			url: `${config.API_URL}/adminapi/dept.dept/add`,
			name: "添加部门",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
		edit: {
			url: `${config.API_URL}/adminapi/dept.dept/edit`,
			name: "编辑部门",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/dept.dept/delete`,
			name: "删除部门",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
		deleteAll: {
			url: `${config.API_URL}/adminapi/dept.dept/deleteAll`,
			name: "删除角色",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
	},
}
